Return the same pixbuf as the input parameter.
authorFederico Mena Quintero <federico@helixcode.com>
Fri, 21 Jan 2000 22:54:44 +0000 (22:54 +0000)
committerArturo Espinosa <unammx@src.gnome.org>
Fri, 21 Jan 2000 22:54:44 +0000 (22:54 +0000)
2000-01-21  Federico Mena Quintero  <federico@helixcode.com>

* gdk-pixbuf/gdk-pixbuf.c (gdk_pixbuf_ref): Return the same pixbuf
as the input parameter.

* gdk-pixbuf/gdk-pixbuf-animation.c (gdk_pixbuf_animation_ref):
Return the same animation as the input parameter.

demos/testpixbuf-drawable.c
docs/reference/gdk-pixbuf/gdk-pixbuf-decl.txt
docs/reference/gdk-pixbuf/tmpl/animation.sgml
docs/reference/gdk-pixbuf/tmpl/refcounting.sgml
gdk-pixbuf/ChangeLog
gdk-pixbuf/gdk-pixbuf-animation.c
gdk-pixbuf/gdk-pixbuf.c
gdk-pixbuf/gdk-pixbuf.h

index 3d43244ca5545710f1d9e5f249e38ee3e8ccbb61..22dab35e9e542b016cf6d6592b5ed665aeb279b6 100644 (file)
@@ -103,4 +103,5 @@ int main(int argc, char **argv)
    
    gtk_widget_show_all(window);
    gtk_main();
+   return 0;
 }
index b85363d39a74bbf7a76dbc6af1e5a55b82191fca..560f696be7551853c8514309a4f56d00a1ddb3b3 100644 (file)
@@ -224,7 +224,7 @@ GdkPixbuf *pixbuf
 </FUNCTION>
 <FUNCTION>
 <NAME>gdk_pixbuf_ref</NAME>
-<RETURNS>void  </RETURNS>
+<RETURNS>GdkPixbuf  *</RETURNS>
 GdkPixbuf *pixbuf
 </FUNCTION>
 <FUNCTION>
@@ -331,7 +331,7 @@ const char *filename
 </FUNCTION>
 <FUNCTION>
 <NAME>gdk_pixbuf_animation_ref</NAME>
-<RETURNS>void  </RETURNS>
+<RETURNS>GdkPixbufAnimation  *</RETURNS>
 GdkPixbufAnimation *animation
 </FUNCTION>
 <FUNCTION>
index 07b392bb89d5a333f5c5e10e4427c35498453cef..2ce521ac84645a3cdede47db9e62fed4588adeb4 100644 (file)
@@ -73,6 +73,7 @@ Animations as multi-frame structures.
 </para>
 
 @animation: 
+@Returns: 
 
 
 <!-- ##### FUNCTION gdk_pixbuf_animation_unref ##### -->
index 845d2ceaf6e4c3f76738e83bfbf2c292b407e24b..9593e7210c5d1aadfb78f2b27dc11b95d2dbe245 100644 (file)
@@ -26,6 +26,7 @@ Functions to perform reference counting on a #GdkPixbuf.
   </para>
 
 @pixbuf: 
+@Returns: 
 
 
 <!-- ##### FUNCTION gdk_pixbuf_unref ##### -->
index 79fcb92abf355f79a6c0de8ff134d61a139a56d8..a60240f84b0e27952c9cbefeca2de9c9b07529ca 100644 (file)
@@ -1,5 +1,13 @@
+2000-01-21  Federico Mena Quintero  <federico@helixcode.com>
+
+       * gdk-pixbuf/gdk-pixbuf.c (gdk_pixbuf_ref): Return the same pixbuf
+       as the input parameter.
+
+       * gdk-pixbuf/gdk-pixbuf-animation.c (gdk_pixbuf_animation_ref):
+       Return the same animation as the input parameter.
+
 2000-01-16  Elliot Lee  <sopwith@redhat.com>
-       
+
        * gdk-pixbuf/Makefile.am: Don't link against libgnomecanvaspixbuf.la
 
 2000-01-16  Federico Mena Quintero  <federico@helixcode.com>
        loading.
        * gdk-pixbuf/io-gif.c (image_load_increment): I think the
        ref-counting mess is finally fixed.  Added progressive animation
-       loading. 
+       loading.
        (gif_get_lzw): remove memory_leak
 
        * doc/tmpl/gdk-pixbuf-loader.sgml: much longer long description
-       added. 
+       added.
 
 2000-01-05  Owen Taylor  <otaylor@redhat.com>
 
        * gdk-pixbuf/pixops/pixops.c (pixops_process): Fix computation of end of run indices.
-         
+
        * gdk-pixbuf/pixops/pixops.c: Fix double increments when dest_channels == 4.
          (Pointed out by Tomas Ogren)
 
 2000-01-05  Mark Crichton  <crichton@gimp.org>
 
-       * gdk-pixbuf/gdk-pixbuf-loader.c (gdk_pixbuf_loader_eat_header_write): 
+       * gdk-pixbuf/gdk-pixbuf-loader.c (gdk_pixbuf_loader_eat_header_write):
        Return 0 if gdk_pixbuf_load_loader_module returns FALSE.
 
 2000-01-05 Elliot Lee <sopwith@redhat.com>
 2000-01-05  Owen Taylor  <otaylor@redhat.com>
 
        * doc/Makefile.am doc/gdk-pixbuf-sections.txt
-         doc/gdk-pixbuf.sgml doc/tmpl/scaling.sgml: 
+         doc/gdk-pixbuf.sgml doc/tmpl/scaling.sgml:
        Added scaling functions into gtk-doc framework.
 
        * gdk-pixbuf/gdk-pixbuf-scale.c: Documentation fixes.
        * gdk-pixbuf/gdk-pixbuf-io.h: Change the order of the update func
        to make it more compatible with the rest of GTK.  Added animation
        framework for progressive loading.
+
        * gdk-pixbuf/io-bmp.c (image_begin_load): Modified to handle new
-       system.  
+       system.
        * gdk-pixbuf/io-ico.c (image_begin_load): ditto
        * gdk-pixbuf/io-png.c (image_begin_load): ditto
        * gdk-pixbuf/io-ras.c (image_begin_load): ditto
        * gdk-pixbuf/gdk-pixbuf.h gdk-pixbuf/gdk-pixbuf-scale.c:
        Nice wrapper routines for the code in pixops that operate
        on pixbufs instead of raw data.
-       
+
        * gdk-pixbuf/testpixbuf-scale: Test program for scaling
        routines.
-       
+
 2000-01-05  Jonathan Blandford  <jrb@redhat.com>
 
        * doc/tmpl/animation.sgml: Documentation changes.
index 5e9e0d17e97391afd92cba251cb3cb636e7358dd..0577a97c468df414c82e6d57ea611c34b812e4a2 100644 (file)
@@ -117,14 +117,17 @@ gdk_pixbuf_animation_new_from_file (const char *filename)
  *
  * Adds a reference to an animation.  It must be released afterwards using
  * gdk_pixbuf_animation_unref().
+ *
+ * Return value: The same as the @animation argument.
  **/
-void
+GdkPixbufAnimation *
 gdk_pixbuf_animation_ref (GdkPixbufAnimation *animation)
 {
-       g_return_if_fail (animation != NULL);
-       g_return_if_fail (animation->ref_count > 0);
+       g_return_val_if_fail (animation != NULL, NULL);
+       g_return_val_if_fail (animation->ref_count > 0, NULL);
 
        animation->ref_count++;
+       return animation;
 }
 
 /**
index fab12f2e3f59bc5320b5ae64596dc737f6d34bd1..792f04b745d1b3470bd969372015a920d1b5984f 100644 (file)
  *
  * Adds a reference to a pixbuf.  It must be released afterwards using
  * gdk_pixbuf_unref().
+ *
+ * Return value: The same as the @pixbuf argument.
  **/
-void
+GdkPixbuf *
 gdk_pixbuf_ref (GdkPixbuf *pixbuf)
 {
-       g_return_if_fail (pixbuf != NULL);
-       g_return_if_fail (pixbuf->ref_count > 0);
+       g_return_val_if_fail (pixbuf != NULL, NULL);
+       g_return_val_if_fail (pixbuf->ref_count > 0, NULL);
 
        pixbuf->ref_count++;
+       return pixbuf;
 }
 
 /**
index 097c25644bffa9b262e1060c18f7e5c92c20b047..ad94e445ca670e5674246d438303cc2e5d9c4a5b 100644 (file)
@@ -97,7 +97,7 @@ int          gdk_pixbuf_get_rowstride       (GdkPixbuf *pixbuf);
 
 /* Reference counting */
 
-void gdk_pixbuf_ref (GdkPixbuf *pixbuf);
+GdkPixbuf *gdk_pixbuf_ref (GdkPixbuf *pixbuf);
 void gdk_pixbuf_unref (GdkPixbuf *pixbuf);
 
 /* Wrap a libart pixbuf */
@@ -234,7 +234,7 @@ GdkPixbuf *gdk_pixbuf_composite_color_simple (GdkPixbuf      *src,
 
 GdkPixbufAnimation *gdk_pixbuf_animation_new_from_file (const char *filename);
 
-void gdk_pixbuf_animation_ref (GdkPixbufAnimation *animation);
+GdkPixbufAnimation *gdk_pixbuf_animation_ref (GdkPixbufAnimation *animation);
 void gdk_pixbuf_animation_unref (GdkPixbufAnimation *animation);
 
 /* General (presently empty) initialization hooks, primarily for gnome-libs */